package com.example.server;



import com.example.silvercare.R;

import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.Preference.OnPreferenceClickListener;


public class ServiceList extends PreferenceActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// Load the preferences from an XML resource
		addPreferencesFromResource(R.layout.service);

		Preference serverclienttestPref = (Preference) findPreference("serverclienttestPref");
		serverclienttestPref.setOnPreferenceClickListener(new OnPreferenceClickListener(){

			@Override
			public boolean onPreferenceClick(Preference arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent("com.example.server.SCSocketComm"));
				return false;
			}
			
		});
		
		Preference mylocationPref = (Preference) findPreference("mylocationPref");
		mylocationPref.setOnPreferenceClickListener(new OnPreferenceClickListener(){

			@Override
			public boolean onPreferenceClick(Preference arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent("com.example.server.GetMyLocation"));
				return false;
			}
			
		});
		
		Preference friendlocationPref = (Preference) findPreference("friendlocationPref");
		friendlocationPref.setOnPreferenceClickListener(new OnPreferenceClickListener(){

			@Override
			public boolean onPreferenceClick(Preference arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent("com.example.server.GetFriendLocation"));
				return false;
			}
			
		});
		
		Preference elnotificationPref = (Preference) findPreference("elnotificationPref");
		elnotificationPref.setOnPreferenceClickListener(new OnPreferenceClickListener(){

			@Override
			public boolean onPreferenceClick(Preference arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent("com.example.server.Notification1ListActivity"));
				return false;
			}
			
		});
		
		Preference panotificationPref = (Preference) findPreference("panotificationPref");
		panotificationPref.setOnPreferenceClickListener(new OnPreferenceClickListener(){

			@Override
			public boolean onPreferenceClick(Preference arg0) {
				// TODO Auto-generated method stub
				startActivity(new Intent("com.example.server.Notification2ListActivity"));
				return false;
			}
			
		});
		
	}

}
